package org.mbds.wolf.exception;

public class UserException extends Exception {

	/**
	 * serialVersionUID
	 */
	private static final long serialVersionUID = -4634860149061536050L;
	private short reason;
	private static UserException instance = null;

	private UserException() {
		super();
	}
	
	public short getReason() {
		return reason;
	}
	
	public static UserException throwIt(short reason) throws UserException {
		if (instance==null) {
			instance = new UserException();
		}
		instance.reason = reason;
		throw instance;
	}
}
